﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Example09.aspx.cs" Inherits="Chapter27.Example09" %>

<!DOCTYPE html>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>代码清单 27-9 otherpage.html 的内容</title>
    <meta name="author" content="Adam Freeman" />
    <meta name="description" content="A simple example" />
</head>
<body>
    <h1>Other Page</h1>
    <p id="msg"></p>
    <button id="banana">Banana</button>
    <button id="apple">Apple</button>
    <script>
        var sel = "No selection made";
        if (window.location.search == "?banana") {
            sel = "Selection: Banana";
        } else if (window.location.search == "?apple") {
            sel = "Selection: Apple";
        }
        document.getElementById("msg").innerHTML = sel;
    </script>
</body>
</html>
